1 <%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="index.aspx.cs" Inherits="sanpham" Title="Trang Chủ" %>
2 <%@ Register TagPrefix=
"cc1" Namespace="SiteUtils" Assembly= "CollectionPager" %>
3 <asp:Content ID=
"Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
4    
5             <asp:AccessDataSource ID=
"AccessDataSource1" runat="server"
6                 DataFile=
"~/App_Data/dienthoaididong.mdb"
7                 
8                 SelectCommand=
"SELECT masp, mahang, tensp, gia, soluong, dacdiem, baohanh, khuyenmai, kieudang, phongcach, anh, ghichu,'chitiet.aspx?tensp='+tensp as chitiet FROM tblsanpham WHERE (mahang = ?)">
9                 <SelectParameters>
10                     <asp:QueryStringParameter DefaultValue=
"nk" Name="mahang"
11                         QueryStringField=
"mahang" Type="String" />
12                 </SelectParameters>
13             </asp:AccessDataSource>
14             <asp:DataList ID=
"DataList2" runat="server" DataKeyField="masp"
15                 RepeatColumns=
"4"
16     onselectedindexchanged=
"DataList2_SelectedIndexChanged">
17                 <ItemTemplate>
18                     <table
19                         style=
"border-right: black 1px solid; border-top: black 1px solid; border-left: black 1px solid;
20                 width: 125px; border-bottom: black 1px solid; height: 154px; background-color: #ffffff"
>
21                         <tr>
22                             <td align=
"left" style="width: 205px; height: 12px; text-align: center"
23                                 valign=
"middle">
24                                 <asp:Label ID=
"Label11" runat="server" Text='<%# Eval("tenhang") %>'></asp:Label>
25                             </td>
26                         </tr>
27                         <tr>
28                             <td align=
"center" style="width: 205px; height: 100px; text-align: center"
29                                 valign=
"top">
30                                 <asp:Image ID=
"Image4" runat="server" Height="86px"
31                                     ImageUrl=
'<%# "dienthoai/"+Eval("anh") %>' Width="85px" />
32                             </td>
33                         </tr>
34                         <tr>
35                             <td align=
"center" style="width: 205px; height: 14px; text-align: center"
36                                 valign=
"top">
37                                 <asp:HyperLink ID=
"HyperLink1" runat="server" Height="40px"
38                                     Text=
'<%# Eval("tensp") %>' NavigateUrl='<%# Eval("chitiet") %>'></asp:HyperLink>
39                             </td>
40                         </tr>
41                         <tr>
42                             <td align=
"center" style="width: 205px; height: 14px; text-align: center" valign="top">
43                                 </td>
44                         </tr>
45                         <tr>
46                             <td align=
"center" style="width: 205px" valign="top">
47                                 <div align=
"center"
48                                     style=
"font-size: 12px; color: #cc0000; font-family: Tahoma">
49                                     <asp:Label ID=
"Label6" runat="server" Font-Size="Smaller" Text="Giá"></asp:Label>
50                                     <asp:Label ID=
"Label7" runat="server" Font-Size="Smaller"
51                                         Text=
'<%# Eval("gia") %>' Width="37px"></asp:Label>
52                                     <span style=
"font-size: 9pt">VNĐ</span></div>
53                             </td>
54                         </tr>
55                         <tr>
56                             <td style=
"width: 205px; height: 18px; text-align: center" valign="top">
57                                 <asp:Label ID=
"Label8" runat="server" Font-Size="Smaller"
58                                     Text=
'<%# Eval("baohanh") %>'></asp:Label>
59                                 <asp:Label ID=
"Label9" runat="server" Font-Size="Smaller"
60                                     Text=
'<%# Eval("baohanh") %>' Width="56px"></asp:Label>
61                             </td>
62                         </tr>
63                         <tr>
64                             <td style=
"width: 205px; height: 18px; text-align: center" valign="top">
65                                 <asp:ImageButton ID=
"ImageButton2" runat="server"
66                                     ImageUrl=
"~/Images/Chonmua1.jpg" CommandName="Select" />
67                             </td>
68                         </tr>
69                         <tr>
70                             <td style=
"width: 205px; height: 18px; text-align: center" valign="top">
71                                 <asp:Label ID=
"Label10" runat="server" Font-Size="Smaller"
72                                     Text=
"Đã đưa vào giỏ hàng" Visible="False" Width="111px" Height="16px"
73                                     style=
"color: #FF3300; font-size: small"></asp:Label>
74                             </td>
75                         </tr>
76                     </table>
77                 </ItemTemplate>
78                 <HeaderTemplate>
79                     <table cellpadding=
"0" cellspacing="0">
80                         <tr>
81                             <td colspan=
"2" height="32"
82                                 style=
"font-weight: bold; background-image: url(Images/thanhngang2.gif); background-repeat: repeat-x; width: 700px; color: White" align="center">
83                                 Để dễ dàng chọn hàng, bạn hãy kích vào nút Xem theo hàng hoặc cột
84                             </td>
85                         </tr>
86                         <tr style=
"background-color: #d8d8d8">
87                             <td style=
"width: 206px; ">
88                                 Xem:
89                                 <asp:ImageButton ID=
"imgcot1" runat="server" Height="22px"
90                                     ImageUrl=
"~/Images/sapxep1.jpg" ToolTip="Hiển thị theo cột" Width="26px" />
91                                 <asp:ImageButton ID=
"imghang1" runat="server" Height="22px"
92                                     ImageUrl=
"~/Images/sapxep2.jpg" ToolTip="Hiển thị theo hàng" Width="26px" />
93                             </td>
94                             <td style=
"text-align: right">
95                                 <asp:DropDownList ID=
"DropDownList1" runat="server" AutoPostBack="True"
96                                     ForeColor=
"#40698F">
97                                     <asp:ListItem Value=
"theo">Sắp xếp theo</asp:ListItem>
98                                     <asp:ListItem Value=
"tang">Giá tăng dần</asp:ListItem>
99                                     <asp:ListItem Value=
"giam">Giá giảm dần</asp:ListItem>
100                                     <asp:ListItem Value=
"moi">Sản phẩm mới</asp:ListItem>
101                                 </asp:DropDownList>
102                             </td>
103                         </tr>
104                     </table>
105                 </HeaderTemplate>
106                 </asp:DataList><span style=
"color: #0000ff; text-decoration: underline"></span><cc1:CollectionPager ID="clp1" runat="server"></cc1:CollectionPager>
107         </asp:Content>



Quản lý website giới thiệu và bán điện thoại di động ASP.net 19.318 lượt xem

Gõ tìm kiếm nhanh...